package com.avicit.zipkinkafkaesserver.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import zipkin2.elasticsearch.ElasticsearchStorage;

import java.util.ArrayList;
import java.util.List;

@Configuration
public class ElasticsearchStorageConfig {

    //TODO es服务地址配置抽取
    @Bean
    public ElasticsearchStorage elasticsearchStorage() {
        List<String> hosts = new ArrayList<>();
        hosts.add("http://192.168.86.10:9200");
        return ElasticsearchStorage.newBuilder().hosts(hosts).build();
    }
}
